package com.rpay.web.controller.basic;

import com.rpay.common.dto.basic.BasicDTO;
import com.rpay.common.vo.PcsResult;
import com.rpay.web.interceptor.authentic.AccessControl;
import com.rpay.web.interceptor.authentic.AccessControlType;
import com.rpay.web.service.BasicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author XXX
 * @mail XXX@hotmail.com
 * @date 2018/5/13
 * @Description:关于我们、关于RPAY等基础信息
*/
@RestController
@RequestMapping(value = "api/basic")
@AccessControl(type = AccessControlType.SECRET)
public class BasicController {
    @Autowired
    BasicService basicService;

    @GetMapping(value = "")
    public PcsResult detail(@RequestParam(name = "code", defaultValue = "ABOUT") String code){
        BasicDTO basicDetail=basicService.detail(code);
        return PcsResult.build(basicDetail);
    }
}
